import request from '@/utils/request'

/**
 * 获取影厅列表信息
 */
export function getHallList(principalName, token) {
    return request({
        url: '/movieArrange/getHallList/' + principalName,
        method: 'get',
        headers: {
            'token': token
        }
    })
}

/**
 * 获取场次表信息
 */
export function getTableData(movieName, hallId, selectDate, token) {
    return request({
        url: '/movieArrange/getTableData',
        method: 'post',
        params: {
            movieName: movieName,
            hallId: hallId,
            date: selectDate
        },
        headers: {
            'token': token
        }
    })
}

/**
 * 新增场次
 */
export function addMovieArrange(movieArrange, token) {
    return request({
        url: '/movieArrange/addMovieArrange',
        method: 'post',
        data: movieArrange,
        headers: {
            'token': token
        }
    })
}

/**
 * 撤销场次
 */
export function removeMovieArrange(movieArrangeId, token) {
    return request({
        url: '/movieArrange/removeMovieArrange/' + movieArrangeId,
        method: 'post',
        headers: {
            'token': token
        }
    })
}